#version 330 core

in vec2 TexCoords;

uniform float Time;
uniform sampler2D image;

out vec4 FragColor;

void main()
{
    vec3 color = vec3(0.0);
    color = texture(image, TexCoords).rgb;
    float avg = (color.r+color.g+color.b)/3.0;
    float b = step(0.5, avg);
    FragColor = vec4(b);
}
